<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>箭头函数的简写规则</title>
</head>
<body>

    <script>
        nums = [123,4,3,2,10];
        var sum =  nums.
        filter(item=>item%2===0).//省略() {}
        map(value=>value*value).//省略(){}
        reduce((preval,item)=>preval+item);//省略{}
        console.log(sum);
    </script>
    
</body>
</html>